 var setting = {
			data: {
				simpleData: {
					enable: true
				}
			},
			callback: {
               onClick:function(event, srcEvent, treeId, node, clickFlag)
               {
               	  if (!treeId.pId)
               	  {
                     return ;
               	  }
               	  var url = buildActivityPath(treeId.menuUrl,treeId.code);
               	  handlerMenu(url);
               }
			}
		};


  jQuery(function()
  { 
        var url=base + "/main/getFunctionList.do"; 
        jQuery.post(
                      url, 
                      function(result){
                         var data = eval("("+result+")");
                         if(data.STATUS==0)
                         {
                         	var funList=data.USER_FUNCTION_LIST; 
                            $.fn.zTree.init($("#funListTree"), setting, funList);
                            return ;
                         }
                         alert(data.MSG);  
        }); 
  }
);


 function buildActivityPath(url,code)
 {
    if(code)
    {
        var index = url.indexOf("?");
        if(index>=0)
        {
        	url=url+"&ACTIVITY_CODE="+code;
        }
        else
        {
        	url=url+"?ACTIVITY_CODE="+code;
        }
    }
    return url;
 }

 function handlerMenu(url)
 {
	 	  if(url)
	 	  {
	 	  	 jQuery("#contentFrame").attr("src",base+url);
	 	  	 return;
	 	  }
		  alert("功能正在开发中，请稍候。。");
 }